"use strict";
cc._RF.push(module, '5e0c3QKKspHHYXjJOh5ZlSS', 'AwakeContent');
// scripts/AwakeContent.js

"use strict";

var e = require;
var t = module;

var n = c(e("DataMgr")),
    o = c(e("SoundMgr")),
    i = c(e("MixMgr")),
    a = c(e("SettingView")),
    r = function (e) {
  if (e && e.__esModule) return e;
  if (null === e || "object" != typeof e && "function" != typeof e) return {
    "default": e
  };
  var t = s();
  if (t && t.has(e)) return t.get(e);
  var n = {},
      o = Object.defineProperty && Object.getOwnPropertyDescriptor;

  for (var i in e) {
    if (Object.prototype.hasOwnProperty.call(e, i)) {
      var a = o ? Object.getOwnPropertyDescriptor(e, i) : null;
      a && (a.get || a.set) ? Object.defineProperty(n, i, a) : n[i] = e[i];
    }
  }

  n["default"] = e;
  t && t.set(e, n);
  return n;
}(e("UIManager"));

function s() {
  if ("function" != typeof WeakMap) return null;
  var e = new WeakMap();

  s = function s() {
    return e;
  };

  return e;
}

function c(e) {
  return e && e.__esModule ? e : {
    "default": e
  };
}

cc.Class({
  "extends": cc.Component,
  properties: {
    GameContent: cc.Node,
    qqBlockAd: cc.Node,
    setIntervalId: -1,
    iconBtn: cc.Node,
    iconBtn2: cc.Node,
    iconBtn3: cc.Node,
    title1: cc.Node,
    title2: cc.Node
  },
  onEnable: function onEnable() {
    if (!n["default"].isRestart) {
      var e = this;
      setTimeout(function () {
        SDK.Mgr.Inst.curChannel == SDK.Define.Channel.oppo ? SDK.Mgr.Inst.closeBanner() : SDK.Mgr.Inst.curChannel == SDK.Define.Channel.vivo && SDK.Mgr.Inst.closeBanner();
        i["default"].Instance.openPanel();
        SDK.Mgr.Inst.curChannel == SDK.Define.Channel.oppo && e.showIcon(!SDK.Mgr.Inst.hasIcon());
      }, 500);
    }
  },
  showIcon: function showIcon(e) {
    this.iconBtn.active = e;
    this.iconBtn2.active = e;
    this.iconBtn3.active = e;
  },
  IconClick: function IconClick() {
    var e = this;
    SDK.Mgr.Inst.createIcon(function (t) {
      if (t == SDK.Define.AdsCode.finish) {
        e.iconBtn.active = !1;
        e.iconBtn2.active = !1;
        e.iconBtn3.active = !1;
      }
    });
  },
  start: function start() {
    if (n["default"].isRestart) {
      n["default"].isRestart = !1;
      this.onStartGameButtonDown();
    } else {
      if (SDK.Mgr.Inst.curChannel == SDK.Define.Channel.oppo) {
        if (SDK.Mini.OPPO.Extend.Inst.hasBoxAd() && SDK.Mgr.Inst.customData && "true" == SDK.Mgr.Inst.customData.openBoxStrong && SDK.Mgr.Inst.isAdOpen) {
          SDK.Mini.OPPO.Extend.Inst.showDrawer();
          this.scheduleOnce(function () {
            SDK.Mini.OPPO.Extend.Inst.showBoxPortal();
          }, .5);
        }
      } else SDK.Mgr.Inst.curChannel == SDK.Define.Channel.qq && SDK.Mgr.Inst.customData && "true" == SDK.Mgr.Inst.customData.openBoxStrong && SDK.Mgr.Inst.isAdOpen && this.scheduleOnce(function () {
        SDK.Mini.QQ.Extend.Inst.showAppBox();
      }, .5);

      if (SDK.Mgr.Inst.curChannel == SDK.Define.Channel.qq) {
        this.title1.active = !1;
        this.title2.active = !0;
      }
    }
  },
  onStartGameButtonDown: function onStartGameButtonDown() {
    o["default"].Instance.playSoundClip(AssetManager.Instance.AudioClips[0]);
    this.node.active = !1;
    this.GameContent.active = !0;
    this.qqBlockAd.active = !0;
    SDK.Mgr.Inst.curChannel == SDK.Define.Channel.tt && SDK.Mgr.Inst.startRecord(); // SDK.Mgr.Inst.curChannel != SDK.Define.Channel.oppo && SDK.Mgr.Inst.curChannel != SDK.Define.Channel.vivo && 

    SDK.Mgr.Inst.showBanner();
    1 != n["default"].Instance.curSkinNum && setTimeout(function () {
      r["default"].Inst.showView(r.E_GameView.tryUse);
    }, 1500);
  },
  onSettingsBtnDown: function onSettingsBtnDown() {
    a["default"].Instance.openPanel();
  }
});

cc._RF.pop();